<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('index')}">车品超市分类</a></li>
        <li class="active"><a href="{:url('add')}">添加分类</a></li>
    </ul>
    <form method="post" class="form-horizontal margin-top-20 js-ajax-form" action="{:url('addPost')}">
        <div class="form-group">
            <label for="input-parent_id" class="col-sm-2 control-label"><span class="form-required">*</span>上级</label>
            <div class="col-md-6 col-sm-10">
                <select class="form-control" name="parent_id" id="input-parent_id">
                    <option value="0">作为顶级分类</option>
                    {$select_category}
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>名称</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-name" name="name">
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>分类封面</label>
            <div class="col-md-6 col-sm-10">

                <div>
                    <input type="hidden" name="img" id="thumb" value="">
                    <a href="javascript:uploadOneImage('图片上传','#thumb');">
                        <img src="/themes/admin_simpleboot3/public/assets/images/default-thumbnail.png"
                             id="thumb-preview" style="cursor: hand;width: 150px; height: 150px;">
                    </a>
                    <input type="button" class="btn btn-sm"
                           onclick="$('#thumb-preview').attr('src','/themes/admin_simpleboot3/public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
                           value="取消图片">
                </div>

            </div>
        </div>

        <div class="form-group">
            <label for="input-status" class="col-sm-2 control-label">状态</label>
            <div class="col-md-6 col-sm-10" id="input-status">
                <select class="form-control" name="status">
                    <option value="1">显示</option>
                    <option value="0">隐藏</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>